package com.wanxin.wb.common.support;

/**
 * feiniu.com Inc.
 * Copyright (c) 2013-2014 All Rights Reserved.
 */


/**
 * <B>Description:</B> 返回结果包装类 <br>
 * <B>Create on:</B> 2014年12月18日 下午5:40:44<br>
 *
 * @author yuan.qin
 * @author 
 * @version 1.0
 */
public class Result {
    /*
     success(string):请求是否成功,0 表示失败 1 表示成功
    code(string): 返回业务编码。具体值和含义参考具体接口说明。
    msg(string): 返回接口调用信息。主要用于返回错误信息。
    sn(string):商品soa服务内部编号。
    data(object):存放返回结果

     */

    private String success;

    /**
     * 状态码
     */
    private String code;

    /**
     * 接口号
     */
    private String sn;

    /**
     * 信息
     */
    private String msg;

    /**
     * 数据
     */
    private Object data;

    public Result() {

    }

    public Result(String code, String serviceNumber) {
        this.code = code;
        this.sn = serviceNumber;
    }

    public Result(String code, String serviceNumber, Object data) {
        this.code = code;
        this.sn = serviceNumber;
        this.data = data;
    }

    public Result(String code, String serviceNumber, String msg, Object data) {
        this.code = code;
        this.sn = serviceNumber;
        this.data = data;
        this.msg = msg;
    }

    public String getSuccess() {
        return success;
    }

    public void setSuccess(String success) {
        this.success = success;
    }

    /**
     * Getter method for property <tt>code</tt>.
     *
     * @return property value of code
     */
    public String getCode() {
        return code;
    }

    /**
     * Setter method for property <tt>code</tt>.
     *
     * @param code value to be assigned to property code
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * Getter method for property <tt>sn</tt>.
     *
     * @return property value of sn
     */
    public String getSn() {
        return sn;
    }

    /**
     * Setter method for property <tt>sn</tt>.
     *
     * @param sn value to be assigned to property sn
     */
    public void setSn(String sn) {
        this.sn = sn;
    }

    /**
     * Getter method for property <tt>msg</tt>.
     *
     * @return property value of msg
     */
    public String getMsg() {
        return msg;
    }

    /**
     * Setter method for property <tt>msg</tt>.
     *
     * @param msg value to be assigned to property msg
     */
    public void setMsg(String msg) {
        this.msg = msg;
    }

    /**
     * Getter method for property <tt>data</tt>.
     *
     * @return property value of data
     */
    public Object getData() {
        return data;
    }

    /**
     * Setter method for property <tt>data</tt>.
     *
     * @param data value to be assigned to property data
     */
    public void setData(Object data) {
        this.data = data;
    }

}
